package com.poorstu.dao.impl;

import java.util.List;

import com.common.base.dao.impl.BaseDaoImpl;
import com.poorstu.dao.BursaryDao;
import com.poorstu.model.AuditsMod;
import com.poorstu.model.BursaryMod;

public class BursaryDaoImpl extends BaseDaoImpl implements BursaryDao {

	public void deleteBursary(BursaryMod bursary) {
			super.delete(bursary);
	}

	public void saveBurary(BursaryMod bursary) {
		super.save(bursary);
	}

	public List<BursaryMod> selectAll() {
		
		return super.findAll("BursaryMod");
	}

	public void updateBursary(BursaryMod bursary) {
		super.merge(bursary);
	}

	public List<AuditsMod> selectAuditById(int allUserId) {
		return super.findByHql("from AuditsMod where allUserId="+allUserId+" and flowId="+3);
	}

	public BursaryMod selectBursaryByauditId(int auditId) {
		
		return (BursaryMod)super.findByHql("from BursaryMod where auditId="+auditId).get(0);
	}


	public BursaryMod selectBursaryByBursaryId(int bursaryId) {
		
		return (BursaryMod)super.findByHql("from BursaryMod where bursaryId="+bursaryId).get(0);
	}
	

}
